package org.dromara.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.system.domain.YzlScheduleFormation;
import org.dromara.system.domain.vo.YzlScheduleFormationVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;

/**
 * 计划编制Mapper接口
 *
 * @author wfy
 * @date 2025-09-15
 */
public interface YzlScheduleFormationMapper extends BaseMapperPlus<YzlScheduleFormation, YzlScheduleFormationVo> {

    int updateFormationCompletionById(Long id);


    @DataPermission({
        @DataColumn(key = "deptName", value = "dept_id"),
        @DataColumn(key = "userName", value = "user_id")
    })
    default Page<YzlScheduleFormationVo> selectVoPageDept(Page<YzlScheduleFormation> page, Wrapper<YzlScheduleFormation> queryWrapper) {
        return this.selectVoPage(page, queryWrapper);
    }

    @DataPermission({
        @DataColumn(key = "deptName", value = "dept_id"),
        @DataColumn(key = "userName", value = "user_id")
    })
    default List<YzlScheduleFormationVo> selectVoListDept(Wrapper<YzlScheduleFormation> queryWrapper) {
        return this.selectVoList(queryWrapper);
    }
}
